#ifndef __SIPUSER_MESSAGE_HPP__
#define __SIPUSER_MESSAGE_HPP__

#include "SipResipConfigure.hpp"

#include "resip/stack/Message.hxx"
#include "resip/stack/ApplicationMessage.hxx"

using namespace resip;

namespace wtsip{

//class CSipTranDestroyMessage: public TransactionMessage
//{
//public:
//    CSipTranDestroyMessage(resip::Data& tid, bool isClient);
//
//    virtual ~CSipTranDestroyMessage();
//
//    virtual const Data& getTransactionId() const; 
//
//    virtual bool isClientTransaction() const; 
//
//    virtual Message* clone() const;
//
//private:
//    bool m_isClient;
//
//    resip::Data m_tid;
//};

class RESIP_PUBLIC TranTimerMessage: public ApplicationMessage
{
public:
    typedef enum {

    } ;
public:

    TranTimerMessage(const resip::Data& tid, bool isClient);

    virtual ~TranTimerMessage();

    virtual bool isClient();

    virtual Message* clone() const;

    virtual EncodeStream& encode(EncodeStream& strm) const;

    virtual EncodeStream& encodeBrief(EncodeStream& str) const;

    const resip::Data& getTid();

private:

    bool m_isClient;

    resip::Data m_tid;   

};


class RESIP_PUBLIC DlgTimerMessage: public ApplicationMessage
{
public:
	typedef enum{
		ClnInviteAlive,
        SrvInviteAlive,
		ClnRegister,
        SrvRegister
	} DlgTimerType;
public:
    DlgTimerMessage(const resip::Data& callid, DlgTimerType type, int seq = 0);

    virtual ~DlgTimerMessage();

    virtual Message* clone() const;

    virtual EncodeStream& encode(EncodeStream& strm) const;

    virtual EncodeStream& encodeBrief(EncodeStream& str) const;

	const resip::Data& getDialogID();

	DlgTimerType getType(){ return m_type; }

    int getSeq(){ return m_seq; }

private:

    int m_seq;

    DlgTimerType m_type;

    resip::Data m_callid;    
};


class RESIP_PUBLIC DlgDestroyMessage: public resip::Message
{
public:
    DlgDestroyMessage(const resip::Data& callid);

    virtual ~DlgDestroyMessage();

    virtual Message* clone() const;

    virtual EncodeStream& encode(EncodeStream& strm) const;

    virtual EncodeStream& encodeBrief(EncodeStream& str) const;

    const resip::Data& getDialogID();

private:

    resip::Data m_callid;
};




}//namespace

#endif

